翻訳と辞書 |
Cut (logic programming) : ウィキペディア英語版 | Cut (logic programming)
The cut, in Prolog, is a goal, written as !, which always succeeds, but cannot be backtracked past. It is best used to prevent unwanted backtracking, for example, to prevent extra solutions being found by Prolog and to avoid additional computations that are not desired or required in a program. The cut should be used sparingly. There is a temptation to insert cuts experimentally into code that is not working correctly. If a test is unnecessary because a cut has guaranteed that it is true, it is good practice to say so in a comment at the appropriate place. It is described by some as a controversial control facility 〔''Foundations of Logic Programming'', Springer (1984).〕 because it was added for efficiency reasons only and isn't a Horn clause. == Types ==
抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Cut (logic programming)」の詳細全文を読む
スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース |
Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.
|
|